package com.crb.crm.manage.message.dingding;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * Package: com.gulimall.thrid.party.dingding
 * Description：釘釘上下文參數配置
 * Author: huangjian
 * Date:  2020/7/1 11:07
 * Modified By:
 */
@Data
@Component
@ConfigurationProperties(prefix = "dingding")
public class DingDingConfig {

    private Oauth2 oauth2;
    private Api api;
    @Data
    public static class Oauth2 {
        private String appkey;
        private String appsecret;
        private String redirect_uri;
        private String dingding_oauth2;
    }

    @Data
    public static class Api {
        private String appkey;
        private String appsecret;
        private Url url;
        @Data
        public static class Url {
            private String gettoken;
            private String getuserinfo_bycode;
            private String getUseridByUnionid;
            private String user_get;
            private String robot_send_hook;
        }
    }
}
